<?php
    include_once '../config.php';

    if ($_COOKIE['LOG'] == false) {
        header('Location: ../index.php');
    }

    include '../layout/header.php';

    mysql_query("SET NAMES 'utf8'");
    mysql_query("SET CHARACTER SET 'utf8'");
?>
<body>
    <div data-role="page">
        <div data-role="header" data-theme="b" class="ui-overlay-shadow">
            <h1>Projekt anlegen</h1>
            <a href="index.php" data-role="button" data-icon="back" class="ui-btn-left" data-theme="a">Liste</a>
        </div>
        <div data-role="content" data-theme="c">
            <?php
                if ($_GET['ag'] == 'no') {
            ?>
            <ul class="ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview">
                <li class="ui-li ui-li-static ui-body-c ui-corner-top">
                    <table align="center">
                        <tr>
                            <td style="vertical-align: middle">
                                <img src="../assets/images/alert.png" width="34px" />
                            </td>
                            <td width="20px"></td>
                            <td style="vertical-align: middle">
                                <font style="color:red">Ein Auftraggeber muss ausgef&uuml;llt werden!</font>
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
            <?php
                } else if ($_GET['ag'] == 'newno') {
            ?>
            <ul class="ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview">
                <li class="ui-li ui-li-static ui-body-c ui-corner-top">
                    <table align="center">
                        <tr>
                            <td style="vertical-align: middle">
                                <img src="../assets/images/alert.png" width="34px" />
                            </td>
                            <td width="20px"></td>
                            <td style="vertical-align: middle">
                                <font style="color:red">Es wurden nicht alle Adressfelder ausgef&uuml;llt beim Neuen Auftraggeber!</font>
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
            <?php
                } else if ($_GET['ag'] == 'pname') {
            ?>
            <ul class="ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview">
                <li class="ui-li ui-li-static ui-body-c ui-corner-top">
                    <table align="center">
                        <tr>
                            <td style="vertical-align: middle">
                                <img src="../assets/images/alert.png" width="34px" />
                            </td>
                            <td width="20px"></td>
                            <td style="vertical-align: middle">
                                <font style="color:red">Es fehlt der Projektname oder der Projektort!</font>
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
            <?php
                }
            ?>
            <ul class="ui-listview ui-listview-inset ui-corner-all ui-shadow" data-inset="true" data-role="listview">
                <li class="ui-li ui-li-static ui-body-c ui-corner-top">
                    <table align="center">
                        <tr>
                            <td style="vertical-align: middle">
                                <img src="../assets/images/alert.png" width="34px" />
                            </td>
                            <td width="20px"></td>
                            <td style="vertical-align: middle">
                                Felder die mit einem * gekennzeichnet sind, sind Pflichtfelder!
                            </td>
                        </tr>
                    </table>
                </li>
            </ul>
            <?php
                include_once 'form/addproject.php';
            ?>
        </div>
    </div>
</body>
</html>